package WangYI;

import java.util.*;
/**
 *
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){

            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] arr = new int[m];
            List<Integer> list = new LinkedList<>();
            StringBuilder sb = new StringBuilder("");
            for (int i = 0; i < m; i++) {
                arr[i] = sc.nextInt();
                list.add(arr[i]);
            }

            int[] num = new int[n-m];
            int p = 0;
            for (int i = 1; i <= n; i++) {
                if(!list.contains(i)){
                    num[p++] = i;
                }
            }

            int[] res = help(arr,num);
            for (int e : res){
                sb.append(e).append(" ");
            }
            String s = sb.toString().substring(0,sb.toString().length()-1);
            System.out.println(s);
        }
    }
    public static int[] help(int[] arr,int[] num){

        int l1 = arr.length;
        int l2 = num.length;
        if(l1 == 0){
            return num;
        }else if(l2 == 0){
            return arr;
        }else{
            int l = l1+l2;
            int[] temp = new int[l];
            int i = 0;
            int j = 0;
            int index = 0;
            while(i<l1 && j <l2){
                if(i<l1 && arr[i] < num[j]){
                    temp[index] = arr[i];
                    i++;
                }else{
                    temp[index] = num[j];
                    j++;
                }
                index++;
            }

            while(i<l1){
                temp[index++] = arr[i++];
            }

            while(j<l2){
                temp[index++] = num[j++];
            }

            return temp;
        }
    }


}
